package hflyeer.gitee.com.service.impl;

import hflyeer.gitee.com.dao.DepartmentDao;
import hflyeer.gitee.com.entity.Department;
import hflyeer.gitee.com.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao dao;

    public void insert(Department department) {
        dao.insert(department);
    }

    public void delete(String sn) {
        dao.delete(sn);
    }

    public void update(Department department) {
        dao.update(department);
    }

    public Department get(String sn) {
        return dao.get(sn);
    }

    public List<Department> getAll() {
        return dao.getAll();
    }
}
